$(document).ready(function () {
	
	$('#add_button').click(addHooligan);
});




function addHooligan() {
	var formData = new FormData(document.getElementById('hooligan_form'));
	$.ajax({
		url: '/api/hools/create/',
		type: 'POST',
		xhr: function () {
			_xhr = $.ajaxSettings.xhr();
			if (_xhr.upload) {
			   // _xhr.upload.addEventListener('progress', progressHandlingFunction, false);
			}
			return _xhr;
		},
		data: formData,
		cache: false,
		contentType: false,
		processData: false
	});
}